﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AIProject.AI
{
    class RandomGameAgent : GameAgent
    {
        private Random r;

        public int Nodes
        {
            get
            {
                return 0;
            }
            set
            {
            }
        }

        public RandomGameAgent()
        {
            r = new Random();
        }

        public RandomGameAgent(int seed)
        {
            r = new Random(seed);
        }

        public Pylos.Action getAction(Percept p)
        {
            Pylos.Action[] actions = p.State.getActions().ToArray();

            return actions[r.Next(actions.Length)];
        }
    }
}
